import request from "@/utils/request"

/**
 * WxJsSdkConfig
 * @param {Object} params
 */
export function WxJsSdkConfig(params) {
	return request.get("/WxJsSdkConfig", {
		params: params
	}).then(res => {
		return res
	})
}
// 微信登录code换openid
export function wxLogin(params) {
	return request.get("/wx/auth2", {
		params: params
	}).then(res => {
		return res
	})
}
// openid自动登录
export const wxOpenidLogin = (params) => {
	return request.post("/wx/api/user/oauth/h5-code-login", params).then(res => {
		return res
	})
}
// 用户vip支付
export const onVipPay = (params) => {
	return request.post("/api/user/vip-pay", params).then(res => {
		return res
	})
}
export function loginMemberById(params) {
	return request.get("/api/loginMemberById", {
		params: params
	}).then(res => {
		return res
	})
}

export function loginMemberByPhone(params) {
	return request.get("/api/loginMemberByPhone", {
		params: params
	}).then(res => {
		return res
	})
}

export function saveMember(params) {
	return request.get("/api/saveMember", {
		params: params
	}).then(res => {
		return res
	})
}

export function updateMember(params) {
	return request.get("/api/updateMember", {
		params: params
	}).then(res => {
		return res
	})
}

export function sendSms(params) {
	return request.get("/api/sendSms", {
		params: params
	}).then(res => {
		return res
	})
}

export function miniLogin(params) {
	return request.get("/wx/wxXcxauth", {
		params: params
	}).then(res => { 
		return res
	})
	
}

export function queryPayStatus(params) {
	return request.get("/api/pay/wxPayVipOrderStatus", {
		params: params
	}).then(res => { 
		return res
	})
}

export function getVipPrice(params) {
	return request.get("/api/getVipPrice", {
		params: params
	}).then(res => { 
		return res
	})
	
}